#define DEBUG
#include <cstdio>

using namespace std;

const int maxn=500000, maxk=19;

int min(int a, int b) {
  return a<b ? a : b;
}

int gcd(int a, int b) {
  if (a==0 || b==0) {
    return 0;
  }
  for (int r=a%b; r; a=b, b=r, r=a%b);
  return b;
}

void initSt(int n, int st[]) {
  for (int i=0; (1<<i)<=n; i++) {
    for (int j=1<<i; j<(1<<(i+1)); j++) {
      st[j] = i;
    }
  }
}

void initRmq(int n, int a[], int rmq[][maxk+1], int f(int a, int b)) {
  for (int i=1; i<=n; i++) {
    rmq[i][0] = a[i];
  }
  for (int i=1; (1<<i)<=n; i++) {
    for (int j=1; j<=n; j++) {
      rmq[j][i] = f(rmq[j][i-1], rmq[j+(1<<(i-1))][i-1]);
    }
  }
}

int getRmq(int l, int r, int st[], int rmq[][maxk+1], int f(int a, int b)) {
  return f(rmq[l][st[r-l+1]], rmq[r-(1<<st[r-l+1])+1][st[r-l+1]]);
}


int main() {
  freopen("point.in", "r", stdin);
  freopen("point.out", "w", stdout);

  int n;
  static int a[maxn+1], rmqMin[maxn+1][maxk+1], rmqGcd[maxn+1][maxk+1], st[maxn+1], ans[maxn+1], anslen=0;
  scanf("%d", &n);
  for (int i=1; i<=n; i++) {
    scanf("%d", a+i);
  }
  initSt(n, st);
  initRmq(n, a, rmqMin, min);
  initRmq(n, a, rmqGcd, gcd);

  for (int i=1; i<=n; i++) {
    for (int j=n; j>=i; j--) {
      if (getRmq(i, j, st, rmqMin, min) == getRmq(i, j, st, rmqGcd, gcd)) {
	if (j-i+1>anslen) {
	  anslen = j-i+1, ans[0]=0;
	}
	if (j-i+1==anslen) {
	  ans[++ans[0]] = i;
	}
      }
    }
  }
  printf("%d %d\n", ans[0], anslen-1);
  for (int i=1; i<=ans[0]; i++) {
    printf("%d ", ans[i]);
  }

  fclose(stdin);
  fclose(stdout);
  return 0;
}
